package zuoye;

public abstract class MilkTea {
    //通用方法:准备牛奶与茶叶
    public void prepareMilkAndTea(){
        System.out.println("准备牛奶与茶叶");
    }
    //抽象方法:添加配料，由子类实现
    public abstract void addIngredients();

    //通用方法:封闭打包
    public void pack(){
        System.out.println("封闭打包");
    }
    //制作奶茶的完整步骤
    public final void makeMilkTea(){
        prepareMilkAndTea();
        addIngredients();
        pack();
    }
}
